﻿<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>帖子回复列表</title>
<link rel="stylesheet" type="text/css" href="<s:property value="staticsRoot"/>/css/style.css"/>
<script type="text/javascript" src="<s:property value="staticsRoot"/>/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $(".data tr:odd").css("background","#fff");
});
</script>
<s:if test="oper == 'success'">
<script type="text/javascript">
	alert("操作成功!");
</script>
</s:if>
</head>

<body id="user_mag">
<div class="right">
	<h3 class="title box">
    	当前位置：k吧后台管理&nbsp;&gt;&gt;&nbsp;回复管理&nbsp;&gt;&gt;&nbsp;列表
    </h3>
    <form name="form1" id="form1" action="threadReplyList.html" method="post">
    <input type="hidden" name="threadId" value='<s:property value="threadId"/>'/>
    <table cellpadding="0" cellspacing="0" width="100%" class="table_top box">
    	<tr>
        	<td width="60%" height="50" align="right">
        		回复状态：
            	<select class="select" name="deleted">
                	<option value="0" <s:if test='deleted == 0 || deleted == null'>selected="selected"</s:if>>正常</option>
                	<option value="1" <s:if test='deleted == 1'>selected="selected"</s:if>>删除</option>
                </select>
                  用户id：
                <input type="text" class="i_text" name="userId" value="<s:property value='userId'/>" />
            </td>
            <td align="left" style="padding-left:10px;">
            	<div class="lit_btn">
                    <a href="#" onclick="query()">查&nbsp;询</a>
                </div>
            </td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="0" width="100%" class="data">
    	<tr>
        	<td width="10%" height="29" align="center">回复id</td>
            <td width="10%" align="center">用户id</td>
            <td width="20%" align="center">用户昵称</td>
            <td width="20%" align="center">删除状态</td>
            <td width="20%" align="center">修改时间</td>
            <td width="20%" align="center">操作</td>
        </tr>
        <s:iterator value="#request.list" var="threadReply">
        	<tr>
	        	<td height="29"><s:property value="#threadReply.id"/></td>
	            <td><s:property value="#threadReply.userId" /></td>
	            <td><s:property value="userMap.get(#threadReply.userId).nick" /></td>
	            <td align="center"><s:property value="#threadReply.deletedStr"/></td>
	            <td align="center"><s:date name="#threadReply.modifiedTime" format="yyyy-MM-dd HH:mm:ss" /> </td>
	            <td align="center">
	            <s:if test="#threadReply.deleted == 0">
	            <a href="threadReplyUpd.html?id=<s:property value='#threadReply.id'/>&deleted=1&threadId=<s:property value='threadId'/>">删除</a>
	            </s:if>
	            <s:else>
	            <a href="threadReplyUpd.html?id=<s:property value='#threadReply.id'/>&deleted=0&threadId=<s:property value='threadId'/>">恢复</a>
	            </s:else>
	            </td>
        	</tr>
        </s:iterator>
    </table>
    <%@include file="page.jsp" %>
    </form>
</div>

<script type="text/javascript">
	function query(){
		$("#form1").submit();
	}
	function doSearch(pageNumber){
		if(pageNumber <= 0){
			pageNumber = 1;
		}	
		$("#page").val(pageNumber); 
		$("#form1").submit(); 
	}
</script>
</body>
</html>
